ObservableInterface

interface ObservableInterface

The `observable` interface provides basic Publish&Subscribe functionality. Classes that extend this functionality and capable of generating events, have to specify event types and corresponding data format for an event.

Functions

subscribe
Link copied to clipboard
abstract fun subscribe(@NonNull() observer: Observer, @NonNull() events: List<String>)
Subscribes an `observer` to a provided array of event types.The `observable` will hold a strong reference to an `observer` instance, therefore,in order to stop receiving notifications, caller must call `unsubscribe` with an`observer` instance used for an initial subscription.
unsubscribe
Link copied to clipboard
abstract fun unsubscribe(@NonNull() observer: Observer)
Unsubscribes an `observer` from all events.
abstract fun unsubscribe(@NonNull() observer: Observer, @NonNull() events: List<String>)
Unsubscribes an `observer` from a provided array of event types.

Inheritors

Observable
Link copied to clipboard
StyleManagerInterface
Link copied to clipboard
MapboxMap
Link copied to clipboard

Extensions

subscribeCameraChange
Link copied to clipboard
fun ObservableInterface.subscribeCameraChange(observer: Observer)
Subscribes an Observer for of event type "camera-changed".
subscribeMapIdle
Link copied to clipboard
fun ObservableInterface.subscribeMapIdle(observer: Observer)
Subscribes an Observer for of event type "map-idle".
subscribeMapLoaded
Link copied to clipboard
fun ObservableInterface.subscribeMapLoaded(observer: Observer)
Subscribes an Observer for of event type "map-loaded".
subscribeMapLoadingError
Link copied to clipboard
fun ObservableInterface.subscribeMapLoadingError(observer: Observer)
Subscribes an Observer for of event type "map-loading-error".
subscribeRenderFrameFinished
Link copied to clipboard
fun ObservableInterface.subscribeRenderFrameFinished(observer: Observer)
Subscribes an Observer for of event type "render-frame-finished".
subscribeRenderFrameStarted
Link copied to clipboard
fun ObservableInterface.subscribeRenderFrameStarted(observer: Observer)
Subscribes an Observer for of event type "render-frame-started".
subscribeResourceRequest
Link copied to clipboard
fun ObservableInterface.subscribeResourceRequest(observer: Observer)
Subscribes an Observer for of event type "resource-request".
subscribeSourceAdded
Link copied to clipboard
fun ObservableInterface.subscribeSourceAdded(observer: Observer)
Subscribes an Observer for of event type "source-added".
subscribeSourceDataLoaded
Link copied to clipboard
fun ObservableInterface.subscribeSourceDataLoaded(observer: Observer)
Subscribes an Observer for of event type "source-data-loaded".
subscribeSourceRemoved
Link copied to clipboard
fun ObservableInterface.subscribeSourceRemoved(observer: Observer)
Subscribes an Observer for of event type "source-removed".
subscribeStyleDataLoaded
Link copied to clipboard
fun ObservableInterface.subscribeStyleDataLoaded(observer: Observer)
Subscribes an Observer for of event type "style-data-loaded".
subscribeStyleImageMissing
Link copied to clipboard
fun ObservableInterface.subscribeStyleImageMissing(observer: Observer)
Subscribes an Observer for of event type "style-image-missing".
subscribeStyleImageUnused
Link copied to clipboard
fun ObservableInterface.subscribeStyleImageUnused(observer: Observer)
Subscribes an Observer for of event type "style-image-remove-unused".
subscribeStyleLoaded
Link copied to clipboard
fun ObservableInterface.subscribeStyleLoaded(observer: Observer)
Subscribes an Observer for of event type "style-loaded".
unsubscribeCameraChange
Link copied to clipboard
fun ObservableInterface.unsubscribeCameraChange(observer: Observer)
Unsubscribe an Observer for event types "camera-changed".
unsubscribeMapIdle
Link copied to clipboard
fun ObservableInterface.unsubscribeMapIdle(observer: Observer)
Unsubscribe an Observer for event types "map-idle".
unsubscribeMapLoaded
Link copied to clipboard
fun ObservableInterface.unsubscribeMapLoaded(observer: Observer)
Unsubscribe an Observer for event types "map-loaded".
unsubscribeMapLoadingError
Link copied to clipboard
fun ObservableInterface.unsubscribeMapLoadingError(observer: Observer)
Unsubscribe an Observer for event types "map-loading-error".
unsubscribeRenderFrameFinished
Link copied to clipboard
fun ObservableInterface.unsubscribeRenderFrameFinished(observer: Observer)
Unsubscribe an Observer for event types "render-frame-finished".
unsubscribeRenderFrameStarted
Link copied to clipboard
fun ObservableInterface.unsubscribeRenderFrameStarted(observer: Observer)
Unsubscribe an Observer for event types "render-frame-started".
unsubscribeResourceRequest
Link copied to clipboard
fun ObservableInterface.unsubscribeResourceRequest(observer: Observer)
Unsubscribe an Observer for event types "resource-request".
unsubscribeSourceAdded
Link copied to clipboard
fun ObservableInterface.unsubscribeSourceAdded(observer: Observer)
Unsubscribe an Observer for event types "source-added".
unsubscribeSourceDataLoaded
Link copied to clipboard
fun ObservableInterface.unsubscribeSourceDataLoaded(observer: Observer)
Unsubscribe an Observer for event types "source-data-loaded".
unsubscribeSourceRemoved
Link copied to clipboard
fun ObservableInterface.unsubscribeSourceRemoved(observer: Observer)
Unsubscribe an Observer for event types "source-removed".
unsubscribeStyleDataFinished
Link copied to clipboard
fun ObservableInterface.unsubscribeStyleDataFinished(observer: Observer)
Unsubscribe an Observer for event types "style-data-loaded".
unsubscribeStyleImageMissing
Link copied to clipboard
fun ObservableInterface.unsubscribeStyleImageMissing(observer: Observer)
Unsubscribe an Observer for event types "style-image-missing".
unsubscribeStyleImageUnused
Link copied to clipboard
fun ObservableInterface.unsubscribeStyleImageUnused(observer: Observer)
Unsubscribe an Observer for event types "style-image-remove-unused".
unsubscribeStyleLoaded
Link copied to clipboard
fun ObservableInterface.unsubscribeStyleLoaded(observer: Observer)
Unsubscribe an Observer for event types "style-loaded".